package com.hust.edu.cn.service.impl;

import com.hust.edu.cn.entity.Friend;
import com.hust.edu.cn.mapper.FriendMapper;
import com.hust.edu.cn.service.FriendService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Yu Jian
 * @since 2021-07-06
 */
@Service
public class FriendServiceImpl extends ServiceImpl<FriendMapper, Friend> implements FriendService {
    @Autowired
    private FriendMapper friendLinkDao;

    @Override
    public List<Friend> listFriendLink() {
        return friendLinkDao.listFriendLink();
    }

    @Override
    public int saveFriendLink(Friend friendLink) {
        return friendLinkDao.saveFriendLink(friendLink);
    }

    @Override
    public Friend getFriendLink(Long id) {
        return friendLinkDao.getFriendLink(id);
    }

    @Override
    public Friend getFriendLinkByBlogaddress(String blogaddress) {
        return friendLinkDao.getFriendLinkByBlogaddress(blogaddress);
    }

    @Override
    public int updateFriendLink(Friend friendLink) {
        return friendLinkDao.updateFriendLink(friendLink);
    }

    @Override
    public void deleteFriendLink(Long id) {
        friendLinkDao.deleteFriendLink(id);
    }

}
